import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";

import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as Elicons from "@element-plus/icons-vue";
import hover from "@/directives/hover.js";
import popover from "@/directives/popover.js";

const app = createApp(App);

// <div v-popover="{title:'xxx',content:'xxx'}"></div>
app.directive(hover.name, hover.callback);
app.directive(popover.name, popover.callback);

for (let iconName in Elicons) {
    app.component(iconName, Elicons[iconName]);
}

app.use(ElementPlus);
app.use(store).use(router).mount("#app");
